licenses(["notice"])

java_test(
    name = "NoSecretKeysetHandleTest",
    size = "small",
    srcs = ["NoSecretKeysetHandleTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:no_secret_keyset_handle",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "CleartextKeysetHandleTest",
    size = "small",
    srcs = ["CleartextKeysetHandleTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:binary_keyset_writer",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:keyset_reader",
        "//src/main/java/com/google/crypto/tink:keyset_writer",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/internal:mutable_monitoring_registry",
        "//src/main/java/com/google/crypto/tink/internal/testing:fake_monitoring_client",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_annotations",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ConfigTest",
    size = "small",
    srcs = ["ConfigTest.java"],
    deps = [
        "//proto:config_java_proto",
        "//src/main/java/com/google/crypto/tink:config",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "JsonKeysetReaderTest",
    size = "small",
    srcs = ["JsonKeysetReaderTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:json_keyset_reader",
        "//src/main/java/com/google/crypto/tink:json_keyset_writer",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/mac:predefined_mac_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_code_gson_gson",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeysetManagerTest",
    size = "small",
    srcs = ["KeysetManagerTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key_manager",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/mac:predefined_mac_parameters",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/tinkkey:key_access",
        "//src/main/java/com/google/crypto/tink/tinkkey:key_handle",
        "//src/main/java/com/google/crypto/tink/tinkkey:secret_key_access",
        "//src/main/java/com/google/crypto/tink/tinkkey:tink_key",
        "//src/main/java/com/google/crypto/tink/tinkkey/internal:proto_key",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "VersionTest",
    size = "small",
    srcs = ["VersionTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:version",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "JsonKeysetWriterTest",
    size = "small",
    srcs = ["JsonKeysetWriterTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:json_keyset_reader",
        "//src/main/java/com/google/crypto/tink:json_keyset_writer",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/mac:predefined_mac_parameters",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "CryptoFormatTest",
    size = "small",
    srcs = ["CryptoFormatTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RegistryTest",
    size = "small",
    srcs = ["RegistryTest.java"],
    tags = ["fips"],
    deps = [
        "//proto:aes_eax_java_proto",
        "//proto:common_java_proto",
        "//proto:hmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:catalogue",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:primitive_wrapper",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key_manager",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_set",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_mac",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/mac:predefined_mac_parameters",
        "//src/main/java/com/google/crypto/tink/signature:signature_key_templates",
        "//src/main/java/com/google/crypto/tink/subtle:aes_eax_jce",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:prf_mac",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "IntegrationTest",
    size = "small",
    srcs = ["IntegrationTest.java"],
    data = ["//testdata/keysets:ecies"],
    deps = [
        "//src/main/java/com/google/crypto/tink:crypto_format",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "UtilTest",
    size = "small",
    srcs = ["UtilTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:util",
        "//src/main/java/com/google/crypto/tink/internal:slow_input_stream",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeysetHandleTest",
    size = "small",
    srcs = ["KeysetHandleTest.java"],
    deps = [
        "//proto:aes_eax_java_proto",
        "//proto:common_java_proto",
        "//proto:ecdsa_java_proto",
        "//proto:hmac_java_proto",
        "//proto:hmac_prf_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:binary_keyset_writer",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:keyset_reader",
        "//src/main/java/com/google/crypto/tink:keyset_writer",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:primitive_wrapper",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink:tink_json_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key_manager",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/internal:internal_configuration",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_status_type_proto_converter",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_key",
        "//src/main/java/com/google/crypto/tink/internal:monitoring_util",
        "//src/main/java/com/google/crypto/tink/internal:mutable_monitoring_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_set",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/internal/testing:fake_monitoring_client",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_signature_config",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac_computation",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_annotations",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_client",
        "//src/main/java/com/google/crypto/tink/prf:prf_config",
        "//src/main/java/com/google/crypto/tink/signature:signature_config",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/subtle:random",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/tinkkey:key_access",
        "//src/main/java/com/google/crypto/tink/tinkkey:key_handle",
        "//src/main/java/com/google/crypto/tink/tinkkey:secret_key_access",
        "//src/main/java/com/google/crypto/tink/tinkkey/internal:proto_key",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "TinkProtoTest",
    size = "small",
    srcs = ["TinkProtoTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "PemKeyTypeTest",
    size = "small",
    srcs = ["PemKeyTypeTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:pem_key_type",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeyTemplatesTest",
    size = "small",
    srcs = ["KeyTemplatesTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "SecretKeyAccessTest",
    size = "small",
    srcs = ["SecretKeyAccessTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RegistryMultithreadTest",
    size = "large",
    srcs = ["RegistryMultithreadTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:key_manager",
        "//src/main/java/com/google/crypto/tink:registry",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "MonitoringUtilTest",
    size = "small",
    srcs = ["MonitoringUtilTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/internal:monitoring_util",
        "//src/main/java/com/google/crypto/tink/internal:primitive_set",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_annotations",
        "//src/main/java/com/google/crypto/tink/monitoring:monitoring_keyset_info",
        "//src/main/java/com/google/crypto/tink/subtle:aes_gcm_jce",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/testing:test_util",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "BinaryKeysetReaderTest",
    size = "small",
    srcs = ["BinaryKeysetReaderTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:binary_keyset_writer",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:keyset_reader",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "TinkProtoKeysetFormatTest",
    size = "small",
    srcs = ["TinkProtoKeysetFormatTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:binary_keyset_writer",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/signature:signature_config",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "TinkJsonProtoKeysetFormatTest",
    size = "small",
    srcs = ["TinkJsonProtoKeysetFormatTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:cleartext_keyset_handle",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:json_keyset_reader",
        "//src/main/java/com/google/crypto/tink:json_keyset_writer",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_json_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/signature:signature_config",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeysetHandleFullPrimitiveTest",
    size = "small",
    srcs = ["KeysetHandleFullPrimitiveTest.java"],
    deps = [
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:primitive_wrapper",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:secret_key_access",
        "//src/main/java/com/google/crypto/tink/internal:key_parser",
        "//src/main/java/com/google/crypto/tink/internal:key_serializer",
        "//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
        "//src/main/java/com/google/crypto/tink/internal:primitive_set",
        "//src/main/java/com/google/crypto/tink/internal:proto_key_serialization",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "TinkProtoParametersFormatTest",
    size = "small",
    srcs = ["TinkProtoParametersFormatTest.java"],
    deps = [
        "//proto:aes_cmac_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:tink_proto_parameters_format",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_parameters",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeyTemplateTest",
    size = "small",
    srcs = ["KeyTemplateTest.java"],
    deps = [
        "//proto:aes_gcm_java_proto",
        "//proto:tink_java_proto",
        "//src/main/java/com/google/crypto/tink:key_template",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/internal:legacy_proto_parameters",
        "//src/main/java/com/google/crypto/tink/internal:mutable_serialization_registry",
        "//src/main/java/com/google/crypto/tink/internal:parameters_serializer",
        "//src/main/java/com/google/crypto/tink/internal:proto_parameters_serialization",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "KeyTemplatesAsParametersTest",
    size = "small",
    srcs = ["KeyTemplatesAsParametersTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:key_templates",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink:registry",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_parameters",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/aead:predefined_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_parameters",
        "//src/main/java/com/google/crypto/tink/config:tink_config",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_parameters",
        "//src/main/java/com/google/crypto/tink/daead:predefined_deterministic_aead_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
        "//src/main/java/com/google/crypto/tink/internal:util",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_ecdsa_parameters",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_hmac_parameters",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_mac_config",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_rsa_ssa_pkcs1_parameters",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_rsa_ssa_pss_parameters",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_signature_config",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:predefined_mac_parameters",
        "//src/main/java/com/google/crypto/tink/prf:predefined_prf_parameters",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_parameters",
        "//src/main/java/com/google/crypto/tink/signature:predefined_signature_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_parameters",
        "//src/main/java/com/google/crypto/tink/streamingaead:predefined_streaming_aead_parameters",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "LegacyKeysetSerializationTest",
    size = "small",
    srcs = ["LegacyKeysetSerializationTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:binary_keyset_reader",
        "//src/main/java/com/google/crypto/tink:binary_keyset_writer",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:key_status",
        "//src/main/java/com/google/crypto/tink:keyset_writer",
        "//src/main/java/com/google/crypto/tink:legacy_keyset_serialization",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/mac:mac_config",
        "//src/main/java/com/google/crypto/tink/signature:signature_config",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ConfigurationFips140v2Test",
    size = "small",
    srcs = ["ConfigurationFips140v2Test.java"],
    tags = ["fips"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:configuration_fips140_v2",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_ctr_hmac_aead_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_gcm_proto_serialization",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac/internal:hmac_proto_serialization",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:prf_set",
        "//src/main/java/com/google/crypto/tink/prf/internal:hmac_prf_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_parameters",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_public_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_public_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_public_key",
        "//src/main/java/com/google/crypto/tink/signature/internal:ecdsa_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature/internal:rsa_ssa_pkcs1_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature/internal:rsa_ssa_pss_proto_serialization",
        "//src/main/java/com/google/crypto/tink/subtle:base64",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
        "@maven//:org_conscrypt_conscrypt_openjdk_uber",
    ],
)

java_test(
    name = "ConfigurationFips140v2WithoutConscryptTest",
    size = "small",
    srcs = ["ConfigurationFips140v2WithoutConscryptTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:configuration_fips140_v2",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "RegistryConfigurationTest",
    size = "small",
    srcs = ["RegistryConfigurationTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:registry_configuration",
        "//src/main/java/com/google/crypto/tink/internal:registry_configuration",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "ConfigurationV0Test",
    size = "small",
    srcs = ["ConfigurationV0Test.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:configuration_v0",
        "//src/main/java/com/google/crypto/tink:deterministic_aead",
        "//src/main/java/com/google/crypto/tink:hybrid_decrypt",
        "//src/main/java/com/google/crypto/tink:hybrid_encrypt",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:mac",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:streaming_aead",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_eax_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_key",
        "//src/main/java/com/google/crypto/tink/aead:aes_gcm_siv_parameters",
        "//src/main/java/com/google/crypto/tink/aead:cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead:x_cha_cha20_poly1305_key",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_ctr_hmac_aead_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_eax_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_gcm_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:aes_gcm_siv_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:cha_cha20_poly1305_proto_serialization",
        "//src/main/java/com/google/crypto/tink/aead/internal:x_cha_cha20_poly1305_proto_serialization",
        "//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_key",
        "//src/main/java/com/google/crypto/tink/daead:aes_siv_parameters",
        "//src/main/java/com/google/crypto/tink/daead/internal:aes_siv_proto_serialization",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:ecies_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_parameters",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_private_key",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_proto_serialization",
        "//src/main/java/com/google/crypto/tink/hybrid:hpke_public_key",
        "//src/main/java/com/google/crypto/tink/hybrid/internal:ecies_proto_serialization",
        "//src/main/java/com/google/crypto/tink/internal:big_integer_encoding",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_key",
        "//src/main/java/com/google/crypto/tink/mac:aes_cmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac:chunked_mac",
        "//src/main/java/com/google/crypto/tink/mac:hmac_key",
        "//src/main/java/com/google/crypto/tink/mac:hmac_parameters",
        "//src/main/java/com/google/crypto/tink/mac/internal:aes_cmac_proto_serialization",
        "//src/main/java/com/google/crypto/tink/mac/internal:hmac_proto_serialization",
        "//src/main/java/com/google/crypto/tink/prf:aes_cmac_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:aes_cmac_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:hkdf_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:hkdf_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_key",
        "//src/main/java/com/google/crypto/tink/prf:hmac_prf_parameters",
        "//src/main/java/com/google/crypto/tink/prf:prf_set",
        "//src/main/java/com/google/crypto/tink/prf/internal:aes_cmac_prf_proto_serialization",
        "//src/main/java/com/google/crypto/tink/prf/internal:hkdf_prf_proto_serialization",
        "//src/main/java/com/google/crypto/tink/prf/internal:hmac_prf_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_parameters",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ecdsa_public_key",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_private_key",
        "//src/main/java/com/google/crypto/tink/signature:ed25519_public_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pkcs1_public_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_parameters",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_private_key",
        "//src/main/java/com/google/crypto/tink/signature:rsa_ssa_pss_public_key",
        "//src/main/java/com/google/crypto/tink/signature/internal:ecdsa_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature/internal:ed25519_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature/internal:rsa_ssa_pkcs1_proto_serialization",
        "//src/main/java/com/google/crypto/tink/signature/internal:rsa_ssa_pss_proto_serialization",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_ctr_hmac_streaming_key",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_ctr_hmac_streaming_parameters",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_key",
        "//src/main/java/com/google/crypto/tink/streamingaead:aes_gcm_hkdf_streaming_parameters",
        "//src/main/java/com/google/crypto/tink/streamingaead/internal:aes_ctr_hmac_streaming_proto_serialization",
        "//src/main/java/com/google/crypto/tink/streamingaead/internal:aes_gcm_hkdf_streaming_proto_serialization",
        "//src/main/java/com/google/crypto/tink/subtle:base64",
        "//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
        "//src/main/java/com/google/crypto/tink/subtle:hex",
        "//src/main/java/com/google/crypto/tink/util:bytes",
        "//src/main/java/com/google/crypto/tink/util:secret_big_integer",
        "//src/main/java/com/google/crypto/tink/util:secret_bytes",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)

java_test(
    name = "LateRegistrationTest",
    size = "small",
    srcs = ["LateRegistrationTest.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:aead",
        "//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
        "//src/main/java/com/google/crypto/tink:public_key_sign",
        "//src/main/java/com/google/crypto/tink:public_key_verify",
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "//src/main/java/com/google/crypto/tink:registry_configuration",
        "//src/main/java/com/google/crypto/tink:tink_json_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink:tink_proto_keyset_format",
        "//src/main/java/com/google/crypto/tink/aead:aead_config",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_mac",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_mac_config",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_public_key_sign",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_public_key_verify",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_signature_config",
        "//src/main/java/com/google/crypto/tink/jwt:jwt_validator",
        "//src/main/java/com/google/crypto/tink/jwt:raw_jwt",
        "//src/main/java/com/google/crypto/tink/jwt:verified_jwt",
        "//src/main/java/com/google/crypto/tink/signature:signature_config",
        "@maven//:com_google_truth_truth",
        "@maven//:junit_junit",
    ],
)
